<?php
$tmp = 255;
        $i = 0;
        while ($tmp != 0) {
            $menu[$i] = $tmp % 2;
            $tmp /= 2;
        }
        
        echo $menu;
?>